package com.ybwh.springboot2.exmple.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import com.alibaba.fastjson.JSON;


/**
 * <p>
 * 账号角色关联表
 * </p>
 *
 * @author fanbeibei
 * @since 2023-07-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_account_role")
@ApiModel(value="SysAccountRole对象", description="账号角色关联表")
public class SysAccountRole implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "账号ID")
    @TableField("account_id")
    private Long accountId;

    @ApiModelProperty(value = "角色ID")
    @TableField("role_id")
    private Long roleId;

    @ApiModelProperty(value = "是否删除(非0-是,0-否)")
    @TableField("deleted")
    @TableLogic
    private Long deleted;

    @ApiModelProperty(value = "创建人ID")
    @TableField("create_id")
    private Long createId;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人ID")
    @TableField("update_id")
    private Long updateId;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;


    public static final String ID = "id";

    public static final String ACCOUNT_ID = "account_id";

    public static final String ROLE_ID = "role_id";

    public static final String DELETED = "deleted";

    public static final String CREATE_ID = "create_id";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_ID = "update_id";

    public static final String UPDATE_TIME = "update_time";





    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

}
